import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import VueRouter from 'unplugin-vue-router/vite'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'

export default defineConfig({
  server:{
    port:8080,
    host: '0.0.0.0', // 配置项目可以局域网访问
	cors: true, // 默认启用并允许任何源
  },
  plugins: [
    AutoImport({
      imports: ["vue", "vue-router"],
    }),
    Components({}),
    VueRouter(),
    vue()
  ],
})
